import { createRouter, createWebHashHistory } from 'vue-router';

const routes = [
  {
    path: '/',
    redirect: '/system/index',
  },

  {
    path: '/system',
    meta: {
      title: '首页',
    },
    component: () => import('../layout/Layout.vue'),

    children: [
      

      {
        path: 'index',
        meta: {
          title: '欢迎页',
        },
        component: () => import('../views/Weather.vue'),
      },
      {
        name: 'manage',
        path: 'manage',
        meta: {
          title: '天气管理页',
        },
        component: () => import('../views/Manage.vue'),
      },
    ],
  },

  {
    path: '/login',
    meta: {
      title:'登录'
    },
    component: () => import('../components/login.vue'),
  },
  // {
  //   name:'404',
  //   path:'/:catchAll(.*)',
  //   component:()=>import('../views/error/404.vue')
  // }
];

const router = createRouter({
  routes,
  history: createWebHashHistory(),
});

export default router;
